package org.example.leetcode.core.mq;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
@RestController
public class TestController {
    @Resource
    RabbitMQService rabbitMQService;
    @Resource
    RabbitTemplate rabbitTemplate;
    @GetMapping("/mqtest")
    public void test(){
        for(int i =0;i<10;i++){
            rabbitMQService.send(RabbitmqConfig.EXCHANGE,"queue_inform_email",i+"zhc");

        }
    }
}
